#include<stdio.h> 
#include<stdlib.h>
#include<malloc.h> 
typedef struct
{
	double rem;
	double im;
}fcomplex;

fcomplex *fadd(fcomplex a,fcomplex b)
{
	fcomplex *ret = (fcomplex*)malloc(sizeof(fcomplex));
	ret->rem = a.rem + b.rem;
	ret->im = a.im + b.im;
	return ret;
}

fcomplex *fminus(fcomplex a,fcomplex b)
{
	fcomplex *ret = (fcomplex*)malloc(sizeof(fcomplex));
	ret->rem = a.rem - b.rem;
	ret->im = a.im - b.im;
	return ret;
}

fcomplex *fmult(fcomplex a,fcomplex b)
{
	fcomplex *ret = (fcomplex*)malloc(sizeof(fcomplex));
	ret->rem = a.rem*b.rem - a.im*b.im;
	ret->im = a.rem*b.im + a.im*b.rem;
	return ret;
}

fcomplex *fdiv(fcomplex a,fcomplex b)
{
	fcomplex *ret = (fcomplex*)malloc(sizeof(fcomplex));
	ret->rem = (a.rem*b.rem - a.im*b.im)/(b.rem*b.rem + b.im*b.im);
	ret->im = (a.rem*b.im + a.im*b.rem)/(b.rem*b.rem + b.im*b.im);
	return ret;
}

int main(void)
{
	char ch;
	fcomplex a;
	fcomplex b;
	scanf("%c%lf%lf%lf%lf",&ch,&a.rem,&a.im,&b.rem,&b.im);
	
	if(ch=='+'){
		fadd(a,b);
		printf("%.2lf+%.2lfi",fadd(a,b)->rem,fadd(a,b)->im);
	}
	if(ch=='-'){
		fminus(a,b);
		printf("%.2lf+%.2lfi",fminus(a,b)->rem,fminus(a,b)->im);
	}
	if(ch=='*'){
		fmult(a,b);
		printf("%.2lf+%.2lfi",fmult(a,b)->rem,fmult(a,b)->im);
	}	   
	if(ch=='/'){
		fdiv(a,b);
		printf("%.2lf+%.2lfi",fdiv(a,b)->rem,fdiv(a,b)->im);
	}
	      
	return 0;
}
